using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class WizardPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //CreateNewWizard( );
    }
    void CreateNewWizard()
    {
        Wizard Wizard2 = new Wizard();
        WizardStep wizardStep = new WizardStep();
        wizardStep.AllowReturn = true;
        wizardStep.StepType = WizardStepType.Start;
        wizardStep.Title = "Select Data Source";
          
        Wizard2.WizardSteps.Add(wizardStep);

        wizardStep = new WizardStep();
        wizardStep.AllowReturn = true;
        wizardStep.StepType = WizardStepType.Step;
        wizardStep.Title = "Select Destination";
        Wizard2.WizardSteps.Add(wizardStep);

        wizardStep = new WizardStep();
        wizardStep.AllowReturn = true;
        wizardStep.StepType = WizardStepType.Step;
        wizardStep.Title = "Import Options";
        Wizard2.WizardSteps.Add(wizardStep);

        wizardStep = new WizardStep();
        wizardStep.AllowReturn = true;
        wizardStep.StepType = WizardStepType.Step;
        wizardStep.Title = "Importing";
        Wizard2.WizardSteps.Add(wizardStep);

        wizardStep = new WizardStep();
        wizardStep.AllowReturn = true;
        wizardStep.StepType = WizardStepType.Complete;
        wizardStep.Title = "Complete";
        Wizard2.WizardSteps.Add(wizardStep);
        
        this.form1.Controls.Add(Wizard2);
    }



    protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Label1.Text = "CurrentStep: " +
        Wizard1.WizardSteps[e.CurrentStepIndex].Title
        + " NextStep: " + Wizard1.WizardSteps[e.NextStepIndex].Title;
    }
    protected void Wizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Label1.Text = "CurrentStep: " +
               Wizard1.WizardSteps[e.CurrentStepIndex].Title
               + " NextStep: " + Wizard1.WizardSteps[e.NextStepIndex].Title;
    }
    protected void Wizard1_PreviousButtonClick(object sender, WizardNavigationEventArgs e)
    {

    }
    protected void Wizard1_CancelButtonClick(object sender, EventArgs e)
    {

    }
}
